package com.alienlab.finder.repository;

import com.alienlab.finder.domain.Relationship;
import org.springframework.data.jpa.repository.*;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * Spring Data  repository for the Relationship entity.
 */
@SuppressWarnings("unused")
@Repository
public interface RelationshipRepository extends JpaRepository<Relationship, Long> {

    Relationship findByMainUserOpenIdAndAndSecondUserOpenId(String main_open_id,String second_open_id);

    List<Relationship> findBySecondUserOpenId(String second_open_id);

    List<Relationship> findByMainUserOpenId(String main_open_id);

    List<Relationship> findByMainUserOpenIdAndRelation(String main_open_id,String relationtype);

}
